package hasthi.manager.gui;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class OutputConsole extends JPanel{
    private JTextArea outputDocument;
    
    public OutputConsole() {
        super();
        outputDocument = new JTextArea(20, 60);
        JScrollPane scrollPane = new JScrollPane(outputDocument); 
        outputDocument.setEditable(false);
        add(scrollPane);
        writeToConsole("Hasthi UI starting ......\n");
    }
    
    public void writeToConsole(String message){
        System.out.println("Recived Message "+ message);
        outputDocument.append(message);
        repaint();
    }

}
